package com.lanyou.cook.entitylistener.domain;

import javax.persistence.PreRemove;

import com.lanyou.cook.datadictionary.UserLogOpt;
import com.lanyou.cook.entity.domain.KettleDataSourceEx;
import com.lanyou.cook.service.UserLogService;

public class KettleDataSourceEntityListenerForLog {

	
	@PreRemove
	public void preRemove(KettleDataSourceEx target) {
		String content = String.format("删除领域系统数据源“%s”", target.getKettleDataSource().getName());
		UserLogService.getInstance().save(UserLogOpt.MaintenanceFieldSystemDataSource, null, content);
	}
	
}
